package com.motu.monstercity.server.game.logic;

import com.motu.monstercity.server.game.userdata.UserSuit;
import com.motu.vertx.module.utility.model.EntityManager;
import com.motu.vertx.module.utility.model.Model;

import java.util.ArrayList;
import java.util.List;

public class SuitUserData extends SuitBaseData {
    // 获取user_suit列表
    public static List<UserSuit> getUserSuitList(long userId) {
        List<UserSuit> list = new ArrayList<>();
        for (Model model : EntityManager.getEntityList(UserSuit.class, userId)) {
            UserSuit entity = (UserSuit) model;
            list.add(entity);
        }
        return list;
    }

    public static UserSuit getUserSuit(long userId, int suitId) {
        return (UserSuit) EntityManager.getEntity(UserSuit.class, userId, suitId);
    }
}
